3.215 \(\int \frac{1}{\csc (c+d x)+\sin (c+d x)} \, dx\)

Optimal. Leaf size=23 \[ -\frac{\tanh ^{-1}\left (\frac{\cos (c+d x)}{\sqrt{2}}\right )}{\sqrt{2} d} \]

[Out]

-(ArcTanh[Cos[c + d*x]/Sqrt[2]]/(Sqrt[2]*d))

________________________________________________________________________________________

Rubi [A]  time = 0.0386754, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4397, 3186, 206} \[ -\frac{\tanh ^{-1}\left (\frac{\cos (c+d x)}{\sqrt{2}}\right )}{\sqrt{2} d} \]

Antiderivative was successfully verified.

[In]

Int[(Csc[c + d*x] + Sin[c + d*x])^(-1),x]

[Out]

-(ArcTanh[Cos[c + d*x]/Sqrt[2]]/(Sqrt[2]*d))

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rule 3186

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos
[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{\csc (c+d x)+\sin (c+d x)} \, dx &=\int \frac{\sin (c+d x)}{1+\sin ^2(c+d x)} \, dx\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{2-x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{\tanh ^{-1}\left (\frac{\cos (c+d x)}{\sqrt{2}}\right )}{\sqrt{2} d}\\ \end{align*}

Mathematica [C]  time = 0.184958, size = 61, normalized size = 2.65 \[ -\frac{\tanh ^{-1}\left (\frac{\cos (c)-(\sin (c)-i) \tan \left (\frac{d x}{2}\right )}{\sqrt{2}}\right )+\tanh ^{-1}\left (\frac{\cos (c)-(\sin (c)+i) \tan \left (\frac{d x}{2}\right )}{\sqrt{2}}\right )}{\sqrt{2} d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Csc[c + d*x] + Sin[c + d*x])^(-1),x]

[Out]

-((ArcTanh[(Cos[c] - (-I + Sin[c])*Tan[(d*x)/2])/Sqrt[2]] + ArcTanh[(Cos[c] - (I + Sin[c])*Tan[(d*x)/2])/Sqrt[
2]])/(Sqrt[2]*d))

________________________________________________________________________________________

Maple [A]  time = 0.077, size = 21, normalized size = 0.9 \begin{align*} -{\frac{\sqrt{2}}{2\,d}{\it Artanh} \left ({\frac{\cos \left ( dx+c \right ) \sqrt{2}}{2}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

-1/2*arctanh(1/2*cos(d*x+c)*2^(1/2))/d*2^(1/2)

________________________________________________________________________________________

Maxima [B]  time = 1.66338, size = 238, normalized size = 10.35 \begin{align*} \frac{\sqrt{2} \log \left (-\frac{2 \,{\left (\sqrt{2} + 1\right )} \cos \left (d x + c\right ) - \cos \left (d x + c\right )^{2} - \sin \left (d x + c\right )^{2} - 2 \, \sqrt{2} - 3}{2 \,{\left (\sqrt{2} - 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sqrt{2} + 3}\right ) + \sqrt{2} \log \left (-\frac{2 \,{\left (\sqrt{2} - 1\right )} \cos \left (d x + c\right ) - \cos \left (d x + c\right )^{2} - \sin \left (d x + c\right )^{2} + 2 \, \sqrt{2} - 3}{2 \,{\left (\sqrt{2} + 1\right )} \cos \left (d x + c\right ) + \cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sqrt{2} + 3}\right )}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="maxima")

[Out]

1/8*(sqrt(2)*log(-(2*(sqrt(2) + 1)*cos(d*x + c) - cos(d*x + c)^2 - sin(d*x + c)^2 - 2*sqrt(2) - 3)/(2*(sqrt(2)
 - 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(d*x + c)^2 - 2*sqrt(2) + 3)) + sqrt(2)*log(-(2*(sqrt(2) - 1)*cos(d*x
 + c) - cos(d*x + c)^2 - sin(d*x + c)^2 + 2*sqrt(2) - 3)/(2*(sqrt(2) + 1)*cos(d*x + c) + cos(d*x + c)^2 + sin(
d*x + c)^2 + 2*sqrt(2) + 3)))/d

________________________________________________________________________________________

Fricas [B]  time = 0.485088, size = 119, normalized size = 5.17 \begin{align*} \frac{\sqrt{2} \log \left (-\frac{\cos \left (d x + c\right )^{2} - 2 \, \sqrt{2} \cos \left (d x + c\right ) + 2}{\cos \left (d x + c\right )^{2} - 2}\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log(-(cos(d*x + c)^2 - 2*sqrt(2)*cos(d*x + c) + 2)/(cos(d*x + c)^2 - 2))/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sin{\left (c + d x \right )} + \csc{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x)

[Out]

Integral(1/(sin(c + d*x) + csc(c + d*x)), x)

________________________________________________________________________________________

Giac [B]  time = 1.24742, size = 92, normalized size = 4. \begin{align*} \frac{\sqrt{2} \log \left (\frac{{\left | -4 \, \sqrt{2} - \frac{2 \,{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 6 \right |}}{{\left | 4 \, \sqrt{2} - \frac{2 \,{\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + 6 \right |}}\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(csc(d*x+c)+sin(d*x+c)),x, algorithm="giac")

[Out]

1/4*sqrt(2)*log(abs(-4*sqrt(2) - 2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 6)/abs(4*sqrt(2) - 2*(cos(d*x + c)
- 1)/(cos(d*x + c) + 1) + 6))/d